﻿<?php
session_start();
if(!@$_SESSION['username']) {
  echo "<script>window.location.href='login.php';</script>";
}
?>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="lib/font-awesome/font-awesome.min.css" rel="stylesheet" type="text/css" />
<!--[if IE 7]>
<link href="lib/font-awesome/font-awesome-ie7.min.css" rel="stylesheet" type="text/css" />
<![endif]-->
<link href="lib/iconfont/iconfont.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>用户管理</title>
</head>
<body>
<nav class="breadcrumb"><i class="iconfont">&#xf012b;</i> 首页 <span class="c-gray en">&gt;</span> 用户中心 <span class="c-gray en">&gt;</span> 用户管理 <a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="icon-refresh"></i></a></nav>
<div class="pd-20">
<!-- <button type="submit" class="btn btn-success" id="" name=""><i class="icon-search"></i> 搜用户</button> -->
  <form action="modules/station/searchAction.php" method="post">
  <div class="text-c">

    出发地:<input name="startStation" type="text" class="input-text" style="width:100px" placeholder="输入出发地" id="" name="">
    目的地:<input name="endStation" type="text" class="input-text" style="width:100px" placeholder="输入目的地" id="" name="">
   日期范围：
    <input name="startTime" type="text" onfocus="WdatePicker({Date:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}'})" id="datemin" class="input-text Wdate" style="width:120px;">
    -
    <input name="endTime" type="text" onfocus="WdatePicker({Date:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}'})" id="datemax" class="input-text Wdate" style="width:120px;">
    <input type="submit" name="submit" value="搜索" class="btn" />
  </div>
  </form>
  <div class="cl pd-5 bg-1 bk-gray mt-20">  <span class="r">共有数据：<strong>88</strong> 条</span> </div>
  <table class="table table-border table-bordered table-hover table-bg table-sort">
    <thead>
     <tr class="text-c">
        <!-- <th width="25"><input type="checkbox" name="" value=""></th> -->
        <th width="80">列车号</th>
        <th width="100">出发地</th>
        <th width="40">目的地</th>
        <th width="90">出发时间</th>
        <th width="150">到达时间</th>
        <!-- <th width="70">高等座</th> -->
        <!-- <th width="70">中等座</th> -->
        <th width="70">有座</th>
        <th width="70">无座</th>
        <th width="50">票价</th>
        <th width="100">操作</th>
      </tr>
    </thead>
    <tbody>

<?php
  //获取全部数据
  include_once('libraries/esaydb.class.php');
  $db = new EasyDB();
  // $sql = "SELECT * FROM ob_order as a, LEFT OUTER JOIN ob_station as b  ON a.sid = b.id";
  $sql = "SELECT * FROM ob_station AS a RIGHT OUTER JOIN ob_ticket AS b ON a.sid = b.sid GROUP BY a.id";
  $result = $db->queryAll($sql);

  // while ($result) {
  foreach ($result as $v) {
    ?>

      <tr class="text-c">
        <!-- <td><input type="checkbox" value="1" name=""></td> -->
        <td><?php echo $v['sid']; ?></td>
        <td><?php echo $v['station_start']; ?></td>
        <td><?php echo $v['station_end']; ?></td>
        <td><?php echo $v['time_start']; ?></td>
        <td><?php echo $v['time_end']; ?></td>
        <td><?php echo $v['number']; ?></td>
        <td><?php echo $v['num_none']; ?></td>
        <td><?php echo $v['price']; ?></td>
        <!-- <td class="user-status"><span class="label label-success radius">已启用</span></td> -->
        <!-- <td class="f-14 user-manage"><a style="text-decoration:none" onClick="user_stop(this,'10001')" href="javascript:;" title="停用"><i class="icon-hand-down"></i></a> <a title="编辑" href="javascript:;" onclick="user_edit('4','600','','编辑','user-add.html')" class="ml-5" style="text-decoration:none"><i class="icon-edit"></i></a> <a style="text-decoration:none" class="ml-5" onClick="user_password_edit('10001','600','240','修改密码','user-password-edit.html')" href="javascript:;" title="修改密码"><i class="icon-key"></i></a> <a title="删除" href="javascript:;" onclick="user_del(this,'1')" class="ml-5" style="text-decoration:none"><i class="icon-trash"></i></a></td> -->
        <td>
        <!-- <a style="text-decoration:none" href="modules/station/addTicketAction.php" title="购票"><i class="icon-plus">加入购物车</i></a> -->
        <a href="javascript:;" onclick="user_add('550','','选购车票','user-add.php?id=<?php echo $v['sid']; ?>')" class="btn btn-default"><i class="icon-plus"></i> 选购车票</a></span>
        </td>
      </tr>
<?php
  }
?>

    </tbody>
  </table>

</div>

</div>
<script type="text/javascript" src="lib/jquery.min.js"></script>
<script type="text/javascript" src="lib/layer1.8/layer.min.js"></script>
<script type="text/javascript" src="lib/laypage/laypage.js"></script>
<script type="text/javascript" src="lib/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="lib/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="js/H-ui.js"></script>
<script type="text/javascript" src="js/H-ui.admin.js"></script>
<script type="text/javascript" src="js/H-ui.admin.doc.js"></script>
</body>
</html>
